{% extends "base.html" %}

{% block additional_title %}
Prijava
{% endblock %}

{% block additional_head %}
{% if user.is_authenticated %}
<meta http-equiv="REFRESH" content="0;url=/mdcs/">
{% endif %}
{% endblock %}

{% block content %}

<center>
	<h1>Prijava</h1>
	{% if form.errors %}
	<p>Korisničko ime ili lozinka pogrešni</p>
	{% endif %}

	<form method="post" action="/mdcs/login/">
		{% csrf_token %}
		<table cellspacing="10px">
			<tr>
	    		<th align="left">Korisničko ime:</th>
	    		<td>{{ form.username }}</td>
			</tr>
			<tr>
	    		<th align="left">Lozinka:</th>
	    		<td>{{ form.password }}</td>
			</tr>
		</table>

		<input type="submit" value="Prijava"/>
		<input type="hidden" name="next" value="{{ next }}" />
	</form>
</center>

{% endblock %}